{layout layout_main.html}
{php}
$page_data = Admin::run()->page_data();
$page_categorys = Admin::run()->page_categorys();
$page_parents = Admin::run()->page_parents();
{/php}
<h3><a href="page.html" class="actionBtn">单页面列表</a>编辑单页面</h3>
<form action="" method="post" onsubmit="ajaxForm(this,callback_ajax,true);return false;">
	<table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
		<tbody>
			<tr>
				<td width="80" align="right">单页面标题</td>
				<td>
					<input type="text" name="form[page_name]" value="{$page_data['page_name']}" size="50" class="inpMain">
				</td>
			</tr>
			<tr>
				<td align="right">文件名</td>
				<td>
					<input type="text" name="form[filename]" value="{$page_data['filename']}" size="50" class="inpMain">
				</td>
			</tr>
			<tr>
				<td align="right">页面URI</td>
				<td><input type="text" name="form[uri]" id="" value="{$page_data['uri']}" size="50" class="inpMain"/></td>
			</tr>
			<tr>
				<td align="right">页面分类</td>
				<td>
					<input type="text" name="form[category]" id="page_category" value="{$page_data['category']}" size="20" class="inpMain">
					{if $page_categorys}
					<select onchange="jQuery('#page_category').val(this.value)">
						<option value="">--</option>
						{loop $page_categorys $k $v}
						<option value="{$v['category']}" {$v['category']==$page_data['category']?'selected="selected"':''}>{$v['category']}</option>
						{/loop}
					</select>
					{/if}
				</td>
			</tr>
			<tr>
				<td align="right">上级页面</td>
				<td>
					<select name="form[parent_id]">
						<option value="0">--</option>
						{loop $page_parents $k $v}
						<option value="{$v['id']}" {$v['page_name']==$page_data['page_name']?'selected="selected"':''}>{$v['page_name']}</option>
						{/loop}
					</select>
				</td>
			</tr>
			<tr>
				<td align="right">单页面内容</td>
				<td>
					{Admin::run()->html_editor('form[content]',$page_data['content'])}
				</td>
			</tr>
			<tr>
				<td align="right">SEO标题</td>
				<td>
					<input type="text" name="form[title]" value="{$page_data['title']}" size="114" class="inpMain">
				</td>
			</tr>
			<tr>
				<td align="right">关键字</td>
				<td>
					<input type="text" name="form[keywords]" value="{$page_data['keywords']}" size="114" class="inpMain">
				</td>
			</tr>
			<tr>
				<td align="right">简单描述</td>
				<td>
					<textarea name="form[description]" cols="115" rows="3" class="textArea">{$page_data['description']}</textarea>
				</td>
			</tr>
			<tr>
				<td align="right">排序</td>
				<td>
					<input type="text" name="form[sort]" value="{$page_data['sort']}" size="114" class="inpMain">
				</td>
			</tr>
			<tr>
				<td></td>
				<td>
					<input type="hidden" name="form[id]" value="{$page_data['id']}">
					<input type="hidden" name="act" value="admin/page_save">
					<input name="submit" class="btn" type="submit" value="提交">
				</td>
			</tr>
		</tbody>
	</table>
</form>